<?php
error_reporting(E_ALL);
ini_set('display_errors', 1);

#require_once 'library/Zend/Loader/Autoloader.php';
#Zend_Loader_Autoloader::getInstance();

define('ENV','SANDBOX');
#define('ENV','LIVE');

if(ENV == 'SANDBOX'){
	$dbhost = 'localhost';
	$dbuser = 'thesis_bis';
	$dbpass = 'thesis_bis';
	$db_name = 'thesis_bis';
} else {
	$dbhost = 'localhost';
	$dbuser = 'root';
	$dbpass = '';
	$db_name = 'thesis_bis';
}
 
$connection = mysql_connect($dbhost, $dbuser, $dbpass);
if (!$connection) { 
	die('Error connecting to mysql' . mysql_error());
}
else{ 
	mysql_select_db($db_name, $connection) or die(mysql_error());
}


/*$dbAdapter = Zend_Db::factory('Pdo_Mysql', array(
    'host'     => $dbhost,
    'username' => $dbuser,
    'password' => $dbpass,
    'dbname'   => $db_name
));*/

?>